package lexicalUnit;

import chalmersbot.Absyn.AdjectiveAdjectivesToken;
import chalmersbot.Absyn.AdjectiveManyWrd;
import chalmersbot.Absyn.Adjective.Visitor;

public class CheckAdjective implements Visitor<String, Environ> {

	@Override
	public String visit(AdjectiveAdjectivesToken p, Environ env) {
		if (env.getFlag()==Environ.SUBJECT)
			if(p.adjectivestoken_.compareTo("responsible")==0)
				env.setTarget(Environ.PERSON);
		return p.adjectivestoken_;
	}

	@Override
	public String visit(AdjectiveManyWrd p, Environ arg) {
		return p.manywrd_.accept(new CheckManyWrd(), arg);
	}

}
